﻿using System;
using System.Collections.Generic;
using System.Text;
using EnCor.ObjectBuilder;

namespace EnCor.Security
{
    [AssembleConfig(typeof(SingleIdentityMapperConfig))]
    public class SingleIdentityMapper : IdentityMapper
    {
        #region IIdentityMapper Members

        public override UserIdentity GetGlobalIdentity(UserIdentity localIdentity)
        {
            return new UserIdentity(localIdentity.Id, localIdentity.Name);
        }

        public override UserIdentity GetLocalIdentity(UserIdentity globalIdentity)
        {
            return new UserIdentity(globalIdentity.Id, globalIdentity.Name);
        }

        #endregion
    }
}
